//
//  XMBagCollectionViewCell.m
//  XunMi
//
//  Created by MacBook on 2024/5/6.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import "XMBagCollectionViewCell.h"
#import "XMBagModel.h"

@interface XMBagCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIView *descView;
@property (weak, nonatomic) IBOutlet UILabel *nameLa;
@property (weak, nonatomic) IBOutlet UILabel *descLa;

@property (weak, nonatomic) IBOutlet UIView *normalView;
@property (weak, nonatomic) IBOutlet UIImageView *imgV;
@property (weak, nonatomic) IBOutlet UILabel *countLa;
@property (weak, nonatomic) IBOutlet UILabel *nameLa1;
@property (weak, nonatomic) IBOutlet UILabel *timeLa;

@end

@implementation XMBagCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    kCornerRadius(self.descView, 10, 1, kHEX(@"#FF5323"));
}

- (void)setModel:(XMBagModel *)model {
    _model = model;
    self.descView.hidden = !model.selected;
    self.normalView.hidden = model.selected;
    self.nameLa.text = model.title;
    self.nameLa1.text = model.title;
    self.descLa.text = model.describe;
    [self.imgV sd_setImageWithURL:kStringToUrl(model.image.file_url) placeholderImage:kDefaultCoverImg];
    self.countLa.text = model.number.stringValue;
    self.timeLa.text = model.expire;
}

@end
